﻿<?php
require_once('../../config.php');
require_once($CFG->dirroot . '/local/myplugin/forms.php');
$path = '/local/myplugin/';
global $DB;


/* Ket noi den file javascript - module.js */
$PAGE->requires->js_init_call('M.local_myplugin');	

 /* CSS */
$cssdir =  $CFG->wwwroot.$path.'mycss.css';
echo '<link rel="stylesheet" href="'.$cssdir.'" type="text/css" media="screen" />';
//echo '<link rel="stylesheet" href="style.css" type="text/css" media="screen" />';

echo '<link rel="stylesheet" href="jquery.treeview/jquery.treeview.css" />';
echo '<script src="jquery.treeview/lib/jquery.cookie.js" type="text/javascript"></script>';
echo '<script src="jquery.treeview/jquery.treeview.js" type="text/javascript"></script>';
echo '<script type="text/javascript" src="jquery.treeview/demo/demo.js"></script>';

/* Chuan bi trang web can hien thi */	
$url = new moodle_url($CFG->wwwroot.'local/myplugin/edit_bok.php');
$PAGE->set_url($url);
$PAGE->set_title('Edit Block of Knowledge');
$PAGE->set_heading('Edit Block of Knowledge');
$PAGE->set_pagelayout('standard');

//Them thanh menu ngang ung voi trang trong duong link
navigation_node::override_active_url(new moodle_url($CFG->wwwroot.'/local/myplugin/edit_bok.php', array('param'=>'value')));

echo $OUTPUT->header();
/* Viet doan code cua ban o day */

$edit_block_knowledge_form = new form_edit_block_knowledge($CFG->wwwroot.$path.'modify_bok.php');
$edit_block_knowledge_form->display();

if ($fromform = $edit_block_knowledge_form->get_data()) {	
	echo $block_id;	
}

echo $OUTPUT->footer();
header("Location:".$CFG->wwwroot.$path.'add_bok.php');
?>
